package com.softWang.job.service;

import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;

import com.softWang.common.base.BaseServiceMy;
import com.softWang.common.exception.LogicException;
import com.softWang.job.po.JobLog;
import com.softWang.job.mapper.JobLogMapper;
import com.softWang.job.vo.jobLog.*;

/**
 * <p>
 * 定时任务管理---定时任务执行日志 服务实现类
 * </p>
 *
 * @author wang
 * @since 2025-05-08
 */
@Service
public class JobLogService extends BaseServiceMy<JobLog> {

     @Resource
     private JobLogMapper jobLogMapper;

     /**
     * 分页条件查询
     * @param param
     * @return
     */
     public List<JobLogQueryAllResult> queryall(JobLogQueryAllParam param){
         param.startPage();
         List<JobLogQueryAllResult> results=jobLogMapper.queryall(param);
         return results;
     }


      /**
      * 获取详情
      * @param id id
      * @return 详情信息
      */
      public JobLog getById(Long id) {
           return jobLogMapper.selectById(id);
      }

      /**
      * 删除部门
      * @param ids 部门id列表
      * @return void
      */
      @Transactional
      public void del(List<Long> ids) {
          jobLogMapper.deleteBatchIds(ids);
      }

    public void cleanJobLog() {
        jobLogMapper.cleanJobLog();
    }
}
